package com.example.pattern.visitor;

/**
 * 应用
 *
 * @author FM_南风
 * @date 2024/7/6
 */
public class VisitorClient {
	public static void main(String[] args) {
		ObjectStructure objectStructure = new ObjectStructure();
		objectStructure.attach(new ConcreteElementA());
		objectStructure.attach(new ConcreteElementB());

		Visitor visitor = new ConcreteVisitor();
		objectStructure.accept(visitor);
	}
}